const requireContext = require.context('./sources', true, /.*\.js/)

let api = {}
requireContext.keys().map(key => {
  const name = key.match(/\/(\w+)\.js/)[1]
  api[name] = requireContext(key).default
})

export default api
